package org.jeecg.modules.cosmetic.constant.enums;

/**
 * @author scx
 * @date 2022/7/13 4:37 下午
 */
public enum ProductTypeEnum {

    RESIDE(1, "驻留类"),
    RINSING(2, "淋洗类"),
    USED_CLEAN(3, "用后清洗/擦除产品"),
    ;

    private Integer type;

    private String msg;

    ProductTypeEnum(Integer type, String msg) {
        this.type = type;
        this.msg = msg;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public static ProductTypeEnum getProductTypeEnumByType(Integer type) {
        if (type == null) {
            return null;
        }
        for (ProductTypeEnum item : ProductTypeEnum.values()) {
            if (item.type == type) {
                return item;
            }
        }
        return null;
    }
}
